<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>

    <script type="text/javascript" name="baidu-tc-cerfication" data-appid="6531713" src="http://apps.bdimg.com/cloudaapi/lightapp.js"></script>
    <meta name="baidu-site-verification" content="qIt5RGE9xf" />
    <meta charset="UTF-8">
    <title>全民公开赛</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.4 -->
    <link href="/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <!-- Font Awesome Icons-->
    <link href="/css/font-awesome.min.css" rel="stylesheet"
          type="text/css"/>
    <!-- Ionicons-->
    <link href="/css/ionicons.min.css" rel="stylesheet" type="text/css"/>
    <!-- Theme style -->
    <link href="/css/AdminLTE.min.css" rel="stylesheet" type="text/css"/>
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link href="/css/_all-skins.min.css" rel="stylesheet" type="text/css"/>


</head>
<body class="skin-blue sidebar-mini">
<div class="wrapper">
    <header class="main-header">
        <!-- Logo -->
        <a href="/match" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><b>全民</b></span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>全民</b>公开赛</span>
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top" role="navigation">
        </nav>
    </header>
    <div class="content-wrapper">
        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-md-12">
                    <!-- Horizontal Form -->
                    <div class="box box-info">
                        <div class="box-header with-border">
                            <h3 class="box-title">登录</h3>
                        </div>
                        <!-- /.box-header -->
                        <!-- form start -->
                        <form class="form-horizontal" action="/login" method="post">
                            <div class="box-body">
                                <div class="form-group">
                                    <label for="inputEmail3" class="col-sm-2 control-label">邮箱</label>

                                    <div class="col-sm-10">
                                        <input type="hidden" name="open_id" value="${open_id}">
                                        <input type="email" class="form-control" id="inputEmail3"
                                               placeholder="Email邮箱地址"
                                               name="user.name">${titleMsg}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="inputPassword3" class="col-sm-2 control-label">密码</label>

                                    <div class="col-sm-10">
                                        <input type="password" class="form-control" id="inputPassword3"
                                               name="user.passWord"
                                               placeholder="密码">
                                    </div>
                                </div>
                            </div>
                            <!-- /.box-body -->
                            <div class="box-footer">
                                <button type="button" onclick="window.location.href='/view/user/register.jsp'"
                                        class="btn btn-default">注册
                                </button>
                                <a href="">忘记密码</a>
                                <button type="submit" class="btn btn-info pull-right">登录</button>
                            </div>
                            <!-- /.box-footer -->
                        </form>
                    </div>
                    <!-- /.box -->
                </div>
                <!--/.col (right) -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-md-12">
                    <div class="box table-responsive">
                        <table class="table table-striped">

                            <tr>
                                <th>比赛名称</th>
                                <th>参赛人数</th>
                                <th>状态</th>
                                <th>赛制</th>
                                <th>报名时间</th>
                                <th>截止时间</th>
                                <th>对阵情况</th>
                            </tr>

                            <tbody>
                            <c:forEach items="${matchs.list}" var="match">
                                <tr>
                                    <td style="text-align:left;"><a href="/SignUp/${match.id}-1">${match.name}</a></td>
                                    <td style="text-align:left;">${match.signUpNum}/${match.playerNum}</td>
                                    <td style="text-align:left;">${match.state}</td>
                                    <td style="text-align:left;">${match.type}</td>
                                    <td style="text-align:left;">${match.signUpTime}</td>
                                    <td style="text-align:left;">${match.closingTime}</td>
                                    <td style="text-align:left;"><c:if test="${match.state!='报名中'&&match.state!='未开始'}"><a
                                            href="/battle/${match.id}">对阵表</a></c:if></td>
                                </tr>
                            </c:forEach>
                            </tbody>
                        </table>

                    </div>
                </div>
                </div>
                <div class="row">
                    <div class="col-md-6">
                        <div class="box box-success">
                            <div class="box-header with-border">
                                <h3 class="box-title">战斗力</h3>
                            </div>
                            <div class="box table-responsive" style="border-top: 0;">
                                <table class="table table-striped">

                                    <tr>
                                        <th>选手</th>
                                        <th>积分</th>
                                    </tr>

                                    <tbody>
                                    <c:forEach items="${players}" var="player">
                                        <tr>
                                            <td style="text-align:left;">${player.signName}</td>
                                            <td style="text-align:left;">${player.score}</td>

                                        </tr>
                                    </c:forEach>
                                    </tbody>
                                </table>

                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="box box-success">
                            <div class="box-header with-border">
                                <h3 class="box-title">冠军榜</h3>
                            </div>
                            <div class="box table-responsive" style="border-top: 0;">
                                <table class="table table-striped">

                                    <tr>
                                        <th>比赛名称</th>
                                        <th>冠军</th>
                                    </tr>

                                    <tbody>
                                    <c:forEach items="${champions}" var="champion">
                                        <tr>
                                            <td style="text-align:left;">${champion.name}</td>
                                            <td style="text-align:left;">${champion.signName}</td>

                                        </tr>
                                    </c:forEach>
                                    </tbody>
                                </table>

                            </div>
                        </div>
                    </div>
                <!--/.col (right) -->
            </div>
        </section>
        <!-- /.content -->
    </div>
    <%@ include file="../common/_new_foot.jsp" %>
</html>
